import request from '@/utils/request';
import { HTTP_METHOD } from '@/utils/http';

const BASE_URL = '/user';

/**
 * 用户注册
 * @param {*} first_name
 * @param {*} last_name
 * @param {*} email
 * @param {*} password
 * @param {*} confirm_password
 * @return {*}
 */
export function register(data) {
  return request({
    url: `${BASE_URL}/user_register`,
    method: HTTP_METHOD.POST,
    data
  });
}

/**
 * @export 绑定用户手机号
 * @param {*} mobile
 * @param {*} code
 * @return {*}
 */
export function bindMobile(data) {
  return request({
    url: `${BASE_URL}/bind_mobile`,
    method: HTTP_METHOD.POST,
    data
  });
}
